<template>
  <!-- 选中 -->
  <view class="w-[48rpx] h-[48rpx] relative" @click="handleClick">
    <up-image
      :src="checkbox"
      :duration="200"
      width="48rpx"
      height="48rpx"
      bgColor="transparent"></up-image>
    <view
      v-if="isChecked"
      class="w-[36rpx] h-[36rpx] absolute top-[6rpx] right-[6rpx] z-[3]">
      <up-image
        :src="checked"
        :duration="200"
        width="36rpx"
        height="36rpx"
        bgColor="transparent"></up-image>
    </view>
  </view>
  <!-- end -->
</template>

<script setup>
import checked from "@/static/images/gift/checked.png";
import checkbox from "@/static/images/gift/checkbox.png";
const isChecked = defineModel();
const handleClick = () => {
  isChecked.value = !isChecked.value;
};
</script>

<style lang="scss" scoped></style>
